<?php if(!empty($sachdangmuons)){?>
<table id='tables'>
<tr><th>STT</th><th>Mã sách</th><th>Tên sách</th><th>Ngày mượn</th><th>Hạn trả</th></tr>

<?php
$i=0; 
foreach ($sachdangmuons as $sachdangmuon):?>
<tr>
	<td><?php echo  ++$i?></td>
	<td><?php echo  $sachdangmuon['Cuonsach']['macs'] ?></td>
	<td><?php echo  $sachdangmuon['Cuonsach']['Dausach']['tensach']; ?></td>
	<td><?php echo  date('d-m-Y',strtotime($sachdangmuon['Giaodichmuontra']['ngaymuon'])) ?></td>
	<td><?php echo  date('d-m-Y',strtotime($sachdangmuon['Giaodichmuontra']['hantra'])) ?></td>
</tr>
<?php
 endforeach;?>
</table>
<?php }?>